import request from '@/utils/request'


export function submit(data) {
  return request({
    url: 'buss/project/submit',
    method: 'post',
    data
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/project/resubmit',
    method: 'post',
    data
  })
}


export function del(ids) {
  return request({
    url: 'buss/project/delete',
    method: 'post',
    data: ids
  })
}

export function getOne(id) {
  return request.get('buss/project/getOne?id='+id)
}

export function getAmountForBigScream(id,mapDataId='') {
  return request.get('buss/project/getAmountForBigScream?projectId='+id+'&mapDataId='+mapDataId)
}


export function getTablePage(data) {
  return request.post('buss/project/paging', data)
}

export function getCompanytList() {
  return request.post('buss/project/getCompanytList')
}

export function getlinkUsersDept(data) {
  return request.post('buss/project/linkUsersDept?compId=' + data)
}

export function getDeptListByCompanyId(data,data2) {
  return request.post('buss/project/getDeptListByCompanyId?compId=' + data + '&setManage='+data2)
}

export function getlinkUsers() {
  return request.post('buss/project/linkUsers')
}


export function getFirstPartUserTree(data) {
  return request.post('buss/project/getFirstPartUserTree?pid='+data)
}


export function getSecondPartUserTree(data) {
  return request.post('buss/project/getSecondPartUserTree?cid='+data)
}

export function getAllProject() {
  return request.post('buss/project/getAllProject')
}


export default {
  submit,
  resubmit,
  getOne,
  del,
  getTablePage,
  getCompanytList,
  getlinkUsersDept,
  getDeptListByCompanyId,
  getlinkUsers,
  getFirstPartUserTree,
  getSecondPartUserTree,
  getAmountForBigScream,
  getAllProject
}
